1c64f98e75afec6bcdbfe3cdb47ac06e7f84aacd,eventsourcing-core/src/test/java/com/eventsourcing/index/NavigableIndexTest.java,NavigableIndexTest,indexQuantization_SpanningTwoBucketsMidRange,#,126

Before Change


    @Test
    public void indexQuantization_SpanningTwoBucketsMidRange() {
        IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
        collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));
        collection.addAll(CarFactory.createCollectionOfCars(100));

        // Merge cost should be 20 because this query spans 2 buckets (each containing 10 objects)...

After Change



    @Test
    public void indexQuantization_SpanningTwoBucketsMidRange() {
        IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();
        Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),
                                                                  Car.CAR_ID);
        index.clear(noQueryOptions());
        collection.addIndex(index);
        collection.addAll(CarFactory.createCollectionOfCars(100));

        // Merge cost should be 20 because this query spans 2 buckets (each containing 10 objects)...